package proj.pt.web;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.validation.Errors;

import proj.pt.model.User;

public class CourseListController extends CustomSimpleFormController {

	protected Map referenceData(HttpServletRequest request, Object command, Errors errors) throws Exception {
		Map dataMap = super.referenceData(request, command, errors);
		
		User currentUser = (User)dataMap.get("currentUser");
		dataMap.put("courses", getLogicProcessor().getCourses(currentUser));
		return dataMap;
	} //end referenceData
	
}
